package com.orangeforms.webadmin.app.model.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * OrangeSingleDemo CheckChangeStaus class
 * 整改状态：-1：待发布 0：待整改，1：整改中 2：整改完成，4：无需整改
 * @author xisheng
 * @date 2022/08/03
 */
public final class CheckChangeStaus {

    public static final int WAIT_PUSH = -1;

    public static final int WAIT_CHECK = 0;

    public static final int CHECKING = 1;

    public static final int FINISH_CHECK = 2;

    public static final int NOT_NEED = 4;

    private static final Map<Object,String> DICT_MAP = new HashMap<>(5);
    static {
        DICT_MAP.put(WAIT_PUSH,"待发布");
        DICT_MAP.put(WAIT_CHECK,"待整改");
        DICT_MAP.put(CHECKING,"整改中");
        DICT_MAP.put(FINISH_CHECK,"整改完成");
        DICT_MAP.put(NOT_NEED,"无需整改");
    }

    /**
     * 判断参数是否为当前常量字典的合法值。
     *
     * @param value 待验证的参数值。
     * @return 合法返回true，否则false。
     */
    public static boolean isValid(Integer value) {
        return value != null && DICT_MAP.containsKey(value);
    }

    /**
     * 私有构造函数，明确标识该常量类的作用。
     */
    private CheckChangeStaus(){}


}
